<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta content="width=device-width, initial-scale=1.0" name="viewport">
  <meta http-equiv="Content-Security-Policy"
        content="default-src 'self' *.gstatic.com *.googleapis.com 'unsafe-inline' 'unsafe-eval'">
  <meta content='Rqueue' name="description">
  <meta content='Rqueue, task queue, scheduled queue, scheduled tasks, asynchronous processor'
        name="keywords">
  <title>{{ default(title, 'Rqueue Dashboard') }}</title>
  <link rel="shortcut icon" href="{{urlPrefix}}rqueue/img/favicon.ico">
  <link href="{{urlPrefix}}rqueue/img/apple-touch-icon.png" rel="apple-touch-icon">
  <link rel="icon" type="image/png" sizes="16x16" href="{{urlPrefix}}rqueue/img/favicon-16x16.png">
  <link rel="icon" type="image/png" sizes="32x32" href="{{urlPrefix}}rqueue/img/favicon-32x32.png">
  <link rel="stylesheet"
        href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i|Raleway:300,300i,400,400i,500,500i,600,600i,700,700i|Poppins:300,300i,400,400i,500,500i,600,600i,700,700i">
  <link href="{{urlPrefix}}rqueue/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  <link href="{{urlPrefix}}rqueue/vendor/boxicons/css/boxicons.min.css" rel="stylesheet">
  <link href="{{urlPrefix}}rqueue/css/rqueue.css" rel="stylesheet">
</head>
<body>
<header id="header" class="fixed-top">
  <div class="container d-flex">
    <div class="logo mr-auto">
      <h1 class="text-green"><a href="{{urlPrefix}}rqueue">Rqueue</a></h1>
    </div>
    <nav class="nav-menu display-none d-lg-block">
      <ul>
        <li class="{% if queuesActive %}active{% endif %}">
          <a href="{{urlPrefix}}rqueue/queues">
            <i class='bx bx-coin-stack'></i>
            <span>Queues</span>
          </a>
        </li>
        <li class="{% if runningActive %}active{% endif %}">
          <a href="{{urlPrefix}}rqueue/running">
            <i class='bx bx-sync'></i>
            <span>Running</span>
          </a>
        </li>
        <li class="{% if scheduledActive %}active{% endif %}">
          <a href="{{urlPrefix}}rqueue/scheduled">
            <i class='bx bxs-hourglass'></i>
            <span>Scheduled</span>
          </a>
        </li>
        <li class="{% if pendingActive %}active{% endif %}">
          <a href="{{urlPrefix}}rqueue/pending">
            <i class='bx bx-spreadsheet'></i>
            <span>Pending</span>
          </a>
        </li>
        <li class="{% if deadActive %}active{% endif %}">
          <a href="{{urlPrefix}}rqueue/dead">
            <i class='bx bx-ghost'></i>
            <span>Dead</span>
          </a>
        </li>
        <li class="{% if utilityActive %}active{% endif %}">
          <a href="{{urlPrefix}}rqueue/utility">
            <i class='bx bxs-wrench'></i>
            <span>Utility</span>
          </a>
        </li>
      </ul>
    </nav>
  </div>
</header>

<main id="main">
  <div class="alert alert-primary alert-dismissible fade display-none" id="global-error-container"
       role="alert">
    <button type="button" class="close" data-dismiss="alert" aria-label="Close">
      <span aria-hidden="true">&times;</span>
    </button>
    <p id="global-error-message"></p>
  </div>
  {% block main %}
  {% endblock %}
</main>

<footer id="footer">
  <div class="container">
    <div class="row">
      <ul class="footer-links">
        <li>
          <h3><a href="https://github.com/sonus21/rqueue" target="_blank">Rqueue</a></h3>
        </li>
        <li>
          <a href="#">Version:&nbsp;<p class="text-white float-right">{{version}}</p></a>
        </li>
        <li>
          <a href="{{releaseLink}}" target="_blank">Latest Version:&nbsp;
            <p class="text-white float-right">{{latestVersion}}</p>
          </a>
        </li>
        <li>
          <a href="#">Time:&nbsp;<p class="text-white float-right">{{time}} ({{timeInMilli}}Ms)</p>
          </a>
        </li>
      </ul>
    </div>
  </div>
</footer>

<div id="delete-modal" class="modal fade">
  <div class="modal-dialog modal-confirm">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="delete-modal-title">Are you sure?</h4>
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      </div>
      <div class="modal-body">
        <p id="delete-modal-body">
          Do you really want to delete this? This process cannot be undone.
        </p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-info" data-dismiss="modal">Cancel</button>
        <button type="button" class="btn btn-danger delete-btn">
          Delete
        </button>
      </div>
    </div>
  </div>
</div>

<div id="info-modal" class="modal fade">
  <div class="modal-dialog modal-info">
    <div class="modal-content">
      <div class="modal-header">
        <h4 class="modal-title" id="info-modal-title">Title</h4>
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
      </div>
      <div class="modal-body">
        <p id="info-modal-body">Some text</p>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-info" data-dismiss="modal">Ok</button>
      </div>
    </div>
  </div>
</div>
<script type="application/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<script type="application/javascript"
        src="{{urlPrefix}}rqueue/vendor/jquery/jquery.min.js"></script>
<script type="application/javascript"
        src="{{urlPrefix}}rqueue/vendor/bootstrap/js/bootstrap.bundle.min.js"></script>
<script type="application/javascript" src="{{urlPrefix}}rqueue/js/rqueue.js"></script>
<script type="application/javascript">
  urlPrefix = "{{urlPrefix}}";
</script>
{% block additional_script %}{% endblock %}
</body>
</html>